﻿<#assign type=goodsPromote.id.type>
<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>商品促销-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet">
<link href="${st.resDomain}/css/form-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC.css" rel="stylesheet">
<script src="${st.resDomain}/scripts/jquery-1.9.1.min.js"></script>
<script src="${st.resDomain}/scripts/base.js"></script>
<style>
table.tab .w1 {
    width: 20px;
    padding-left: 8px;
    padding-right: 3px;
}
table.tab .w1 input {
    margin-top: 5px;
}
table.tab .w2 {
    width: 60px;
    padding-right: 0px;
}
table.tab td.w2 a {
    height: 50px;
    width: 50px;
    border: 1px solid #CCC;
    display: block;
    margin: auto;
}
table.tab td.w2 img {
    height: 50px;
    width: 50px;
}
table.tab .w3 {
    text-align: left;
    max-width: 200px;
    line-height: 1.5em;
}

.popover {
	display: none;
    position: absolute;
    margin-top: -65px;
    margin-left: -230px;
    z-index: 1060;
    max-width: 276px;
    padding: 1px;
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.42857;
    text-align: start;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    word-wrap: normal;
    white-space: normal;
    background-color: #FFF;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}
.popover.right {
    margin-left: 0px;
}
.bs-example-popover .popover {
    position: relative;
    display: block;
    float: left;
    width: 260px;
    margin: 20px;
}
.popover > .arrow, .popover > .arrow::after {
    position: absolute;
    display: block;
    width: 0px;
    height: 0px;
    border-color: transparent;
    border-style: solid;
}
.popover > .arrow {
    border-width: 11px;
}
.popover.right > .arrow {
    top: 50%;
    left: -11px;
    margin-top: -11px;
    border-right-color: rgba(0, 0, 0, 0.25);
    border-left-width: 0px;
}
.popover.left > .arrow {
    top: 50%;
    right: -11px;
    margin-top: -11px;
    border-right-width: 0px;
    border-left-color: rgba(0, 0, 0, 0.25);
}
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
}
.popover-title {
    padding: 8px 14px;
    margin: 0px;
    font-size: 14px;
    background-color: #F7F7F7;
    border-bottom: 1px solid #EBEBEB;
    border-radius: 5px 5px 0px 0px;
}
.popover-content {
    padding: 9px 14px;
}
.popover-content p {
    margin: 0px 0px 10px;
}
</style>
</head>

<body>
<!--- header --->
<div id="header">
  <div class="main f_clear">
    <div class="logo"><h2><@shiro.principal property="s_name" /></h2><span>您好！<@shiro.principal property="m_name" />， <a href="${st.domain}/member/logoutDo">退出</a>&nbsp;&nbsp;&nbsp;[ <a href="${st.shopDomain}/localSale/v1.1" target="_blank">进行线下销售</a> ]</span></div>
    <div class="f_right"><a href="${st.userDomain}">个人中心</a> <a href="${st.shopDomain}" class="selected">店铺管理</a><@shiro.hasRole name="FIRM"><a href="${st.firmDomain}">企业管理</a></@shiro.hasRole></div>
  </div>
</div>
<!--- header end--->
<!--topnav -->
<div id="topnav">
  <div class="main">
    <ul class="left">
      
      <li><a href="${st.shopDomain}/order/list?statuses=0">订单</a></li>
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">商品</a></li>
      <li><a href="${st.shopDomain}/memberVip">会员</a></li>      
      <li><a href="${st.shopDomain}/store/edit">店铺</a></li>      
      <li><a href="${st.shopDomain}/goodsReport">数据</a></li>
    </ul>
  </div>
</div>
<!--topnav end-->
<div id="main" class="f_clear">
  <div id="left">
    <ul id="menu1">
      <li><a href="${st.shopDomain}/storeGoods/list">店铺商品</a></li>
      <li><a href="${st.shopDomain}/store/onlineSetting">线上销售</a></li>
      <li <#if type == 0 || type == 1>class="selected"</#if> style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=0">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=0">满额促销</a></li>
      <li><a href="${st.shopDomain}/store/localSetting">线下销售</a></li>
      <li <#if type == 2 || type == 3>class="selected"</#if> style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=2">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=2">满额促销</a></li>
      
      <li style="margin-left:10px;"><a href="${st.shopDomain}/localSale/soft">离线版本</a></li>
      <li><a href="${st.shopDomain}/storeRestock/list?isChecked=0">进货管理</a></li>
      <li><a href="${st.shopDomain}/storeGoods/add">商品入库</a></li>
    </ul>
  </div>
  <div id="right">
    <div id="title"><#if type == 0 || type == 1>线上<#else>线下</#if>销售 - 商品促销</div>
    <ul class="tab_menu">
      <#if type == 0 || type == 1>
      <li id="typeFilter_0"><a href="javascript:;">打折</a></li>
      <li id="typeFilter_1"><a href="javascript:;">随赠</a></li>
	  <#else>
	  <li id="typeFilter_2"><a href="javascript:;">打折</a></li>
      <li id="typeFilter_3"><a href="javascript:;">随赠</a></li>
      </#if>
    </ul>
    <div id="search">
     <form id="search_form" onsubmit="$(this).showMsg('正在查询...', 'load');">
      <div class="left" style="padding-top:4px; width:auto; float:right">
        <input type="hidden" id="gpType" name="id.type" value="${goodsPromote.id.type}"/>
        <select name="status">
          <option value="">-促销状态-</option>
          <#list gpStatuses as gpStatus>
           <option value="${gpStatus.value}" <#if goodsPromote.status == gpStatus.value>selected</#if> >${gpStatus.text}</option>
          </#list>
        </select>
        <input name="searchWord" type="text" class="k" value="${searchWord}" placeholder="商品名/商品编码" autofocus="autofocus"/>
        <input type="submit" class="feignhide"><!-- 实现回车提交 -->
        <a onclick="$('#search_form').submit();" class="btn3">筛选</a></div>
     </form>
    </div>
    <div id="cxhd">
      <form id="goodsPromote_form">
      <#list list as gp>
      <#assign id=gp.id.storeGoodsId + "_" + gp.id.type>
      <div id="jsonData_${id}" style="display:none;">
		{"storeGoodsId": ${gp.id.storeGoodsId},"type":${gp.id.type},"status":${gp.status},"updateTime":${gp.updateTime},"startTime":${gp.startTime},"endTime":${gp.endTime}}
	  </div>        
      <table id="item_${id}" width="50%" border="0" cellspacing="0" cellpadding="0" class="tab" style="float:left;">
        <tr>
          <td class="w1">
           <input id="ck_${id}" type="checkbox" value="${gp.id.storeGoodsId}" />
           <input id="typeInput_${id}" type="hidden" value="${gp.id.type}" />
          </td>
          <td class="w2"><a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${gp.id.storeGoodsId}&type=${gp.id.type}"><img src="${st.resDomain}/images/goods_def.jpg" <#if gp.storeGoods.pic??>data="${gp.storeGoods.pic}" </#if>/></a></td>
          <td class="w3"><span>${gp.storeGoods.barCode}</span><br><a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${gp.id.storeGoodsId}&type=${gp.id.type}">${gp.storeGoods.name}</a></td>
          <td class="chartItem" style="width:100px;">
          	<div class="popover left">
		      <div class="arrow"></div>
		      <h3 class="popover-title">活动详情：</h3>
		      <div class="popover-content"></div>
		    </div>
		    <div id="chart_${id}" style="width:100px;height:100px;"></div>
          </td>
        </tr>
      </table>
      </#list>
      </form>
      <div class="tabletj n-yellow" style="clear:both;">
        <div class="left">
          <input name="selectAll" type="checkbox" />
          <a href="javascript:;" id="delSelected" class="btn3">删除</a></div>
        <div id="page">
          ${pl.linkString}
        </div>
      </div>
    </div>
  </div>
</div>
<div id="detailTmp" style="display:none;">
  <p>活动时长：-{timeLength}-</p>
  <p>开始时间：-{startTime}-</p>
  <p>结束时间：-{endTime}-</p>
  <p>添加时间：-{addTime}-</p>
  <p>活动状态：-{statusText}-</p>
  <p>操作： -{ctrlHtml}-</p>
</div>
<!--footer-->
<div id="footer">Copyright© 迈小众<span style="padding-left:30px;">客服QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3101084438&site=qq&menu=yes" rel="nofollow"><img border="0" src="http://wpa.qq.com/pa?p=2:3101084438:50" alt="点击联系我们，QQ：3101084438" title="点击联系我们，QQ：3101084438"></a></span></div>
<!--footer end-->
<script data-main="${st.resDomain}/scripts/shop/goodsPromote_list" src="${st.resDomain}/scripts/require.js"></script>
<script src="${st.resDomain}/scripts/echarts-2.2.1/echarts.js"></script>
</body>
</html>
